package com.spacex.danhuang.polive.Application;

import android.app.Application;

import com.spacex.danhuang.polive.Constants.Constants;

import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import io.socket.client.IO;
import io.socket.client.Socket;

/**
 * Created by weichao on 16/6/2.
 */
public class VApplication extends Application {
    private Socket mSocket;

    private String userToken = "";
    private String userId = "";
    private String nickName = "";
    private int sex;
    private int bondState;
    private String phoneNum = "";

    private String roomName = "";

    private int userRole;
    private int chatroomRole;

    {
        try {
            mSocket = IO.socket(Constants.SERVICE_SERVER_URL);
        } catch (URISyntaxException e) {
            throw new RuntimeException(e);
        }
    }

    public Socket getSocket() {
        return mSocket;
    }

    public void setUserToken(String token) {
        this.userToken = token;
    }

    public String getUserToken() {
        return userToken;
    }

    public void setUserId(String userid) {
        this.userId = userid;
    }

    public String getUserId() {
        return userId;
    }

    public void setNickName(String name) {
        this.nickName = name;
    }

    public String getNickName() {
        return nickName;
    }

    public void setBondState(int bondState) {
        this.bondState = bondState;
    }

    public int getBondState() {
        return bondState;
    }

    public void setPhoneNum(String telephone) {
        this.phoneNum = telephone;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getSex() {
        return sex;
    }



    public void setRoomName(String roomname) {
        this.roomName = roomname;
    }

    public String getRoomName() {
        return roomName;
    }



    public void setUserRole(int userrole) {
        this.userRole = userrole;
    }

    public int getUserRole() {
        return userRole;
    }

    public void setChatroomRole(int chatroomrole) {
        this.chatroomRole = chatroomrole;
    }

    public int getChatroomRole() {
        return chatroomRole;
    }
}
